package com.kikcn.demo.domain;

import javax.persistence.*;
import java.io.Serializable;

/**
 * User: Administrator
 * Date: 2015/4/20
 * Time: 21:29
 */
@Entity
@Table(name="T_CAR")
public class Car extends Base implements Serializable {
    @Column
    private String name;
    @ManyToOne
    @JoinColumn(name="brand",nullable = false)
    private Brand brand;

    public Brand getBrand() {
        return brand;
    }

    public void setBrand(Brand brand) {
        this.brand = brand;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
